package alg;

//import data.*;
//import java.util.*;
import static conf.Configuration.*;

public class BulkTester
{
	private static final int NUM_CHANGES = 100;
	public static void main(String args[])
	{
		double bestHeuristic = Double.POSITIVE_INFINITY;
		double bestOffset = 0;
		/* 		
        for(int i = 0; i < NUM_CHANGES; i++)
		{
			DESIRABILITY_DIVISOR_OFFSET = DESIRABILITY_DIVISOR_OFFSET + 1; 
			AlgorithmTester.run();
			//System.out.println("Heuristic: " + AlgorithmTester.courseProcessor.calcHeuristic() + " at DESIRABILITY_DIVISOR_OFFSET: " + DESIRABILITY_DIVISOR_OFFSET);
			if (AlgorithmTester.courseProcessor.calcHeuristic() < bestheuristic)
			{
				bestheuristic = AlgorithmTester.courseProcessor.calcHeuristic();
				bestOffset = DESIRABILITY_DIVISOR_OFFSET;
			}
			System.out.println(i);
		}
		
		DESIRABILITY_DIVISOR_OFFSET = bestOffset;
		
		System.out.println("Heuristic: " + bestHeuristic + " at DESIRABILITY_DIVISOR_OFFSET: " + bestOffset);
		*/
		
		for(int i = 0; i < NUM_CHANGES; i++)
		{
			DESIRABILITY_GRADE_OFFSET = DESIRABILITY_GRADE_OFFSET + 1; 
			AlgorithmTester.run();
			//System.out.println("Heuristic: " + AlgorithmTester.courseProcessor.calcHeuristic() + " at DESIRABILITY_DIVISOR_OFFSET: " + DESIRABILITY_DIVISOR_OFFSET);
			if (AlgorithmTester.courseProcessor.calcHeuristic() < bestHeuristic)
			{
				bestHeuristic = AlgorithmTester.courseProcessor.calcHeuristic();
				bestOffset = DESIRABILITY_GRADE_OFFSET;
			}
			System.out.println(i);
			System.out.println(bestHeuristic);
		}
		
		System.out.println("Heuristic: " + bestHeuristic + " at DESIRABILITY_GRADE_OFFSET: " + bestOffset);
		
		/* ArrayList<Course> bestCourses = null;
		
		for (int i = 0; i < 10; i++)
		{
			AlgorithmTester.run();
			if (AlgorithmTester.courseProcessor.calcHeuristic() < bestHeuristic)
			{
				bestHeuristic = AlgorithmTester.courseProcessor.calcHeuristic();
				bestCourses = AlgorithmTester.courseProcessor.getCoursesCopy();
			}
			AlgorithmTester.courseProcessor.shuffleCourses();
			System.out.println(i);
			System.out.println(bestHeuristic);
		}
		
		System.out.println("Heuristic: " + bestHeuristic);
		for (Course c : bestCourses)
		{
			System.out.println(c);
		} */
	}
}